import http from "./http";
// import { WorksType, WorksList, DiaryType, DiaryList, User,Login } from "@/api/type";

// 获取个人信息
export const getUserInfo = async () => {
    const { data } = await http.get(`/blog/v1/get-user`, {});
    return data;
};
// 获取热门的作品类型
export const getHotWorksType = async () => {
    const { data } = await http.get('/blog/v1/get-hot-works-type', {})
    return data
}
// 获取热门的日记类型
export const getHotDiaryType = async () => {
    const { data } = await http.get('/blog/v1/get-hot-diary-type', {})
    return data
}
// 获取热门的日记
export const getHotDiary = async (currentPage: string, pageSize: string,id?:number) => {
    const { data } = await http.get('/blog/v1/get-hot-diary', { currentPage, pageSize,id })
    return data
}
// 获取日记
export const getDiary = async (currentPage: string, pageSize: string,id?:number) => {
    const { data } = await http.get('/blog/v1/get-diary', { currentPage, pageSize,id })
    return data
}
// 获取日记类型
export const getDiaryType = async () => {
    const { data } = await http.get('/blog/v1/get-diary-type-web', {})
    return data
}
// 获取作品类型
export const getWorksType = async () => {
    const { data } = await http.get('/blog/v1/get-works-type-web', {})
    return data
}
// 获取作品详情
export const getWorksList = async (id:number) => {
    const { data } = await http.get('/blog/v1/get-works-web', {id})
    return data
}
// 获取作品详情
export const getDiaryList = async (id:number) => {
    const { data } = await http.get('/blog/v1/get-diary-web', {id})
    return data
}
// 获取作品详情
export const getProjectList = async (id:number) => {
    const { data } = await http.get('/blog/v1/get-project-web', {id})
    return data
}



